package com.geotmt.billingcenter.common.enumpackage;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * @Description 阶梯计费周期
 * @Author      yanghanwei
 * @Mail        yanghanwei@geotmt.com
 * @Date        2019/3/25 15:11
 * @Version     v1
 **/
public enum StairCycleEnum {
    /**
     * 阶梯计费周期
     */
    YEAR(1, "年"),
    QUARTER(2, "季度"),
    MONTH(3, "月"),
    DAY(4, "日");

    public Integer value;

    public String memo;

    StairCycleEnum(Integer value, String memo) {
        this.value = value;
        this.memo = memo;
    }

    private static final Map<Integer, StairCycleEnum> lookup = new HashMap<Integer, StairCycleEnum>();

    static {
        for (StairCycleEnum s : EnumSet.allOf(StairCycleEnum.class)) {
            lookup.put(s.value, s);
        }
    }

    public static StairCycleEnum get(Integer value) {
        return lookup.get(value);
    }
}
